//登录
import http from "@/utils/http"
export const loginApi = (data) => {
    return http.post("/auth/user/login", data);
}

//验证码
export const codeApi = () => {
    return http.get("/captcha/get");
}

//获取当前用户信息
export const currentUserApi = () => {
    return http.get("/auth/user/current");
}

//页面渲染
export const UserPageApi = (data) => {
    return http.post("/auth/user/page", data);
}
//按编号检索用户id
export const UserInfoByIdApi = (userId) => {
    return http.get(`/auth/user/info/${userId}`);
}
//新增
export const addUserApi = (data) => {
    return http.post("/auth/user/add", data);
}
//编辑
export const editUserApi = (data) => {
    return http.post("/auth/user/edit", data);
}
//分配角色
export const assignRoleApi = (data) => {
    return http.post("/auth/user/assign", data);
}
// 删除用户
export const delUserApi = (userId) => {
    return http.get(`/auth/user/del/${userId}`);
}